package com.cgwx.tcservice.service.impl;

import com.cgwx.tcservice.client.SystemClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

/**
 * @author GaoWei
 * @Date 2023/10/28 - 11:47
 */

@Service
public class TcUserDetailsServiceImpl implements UserDetailsService{

    @Autowired
    private SystemClient systemClient;

    @Override
    public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException {
        return systemClient.loadUserByUsername(s);
    }
}
